package net.jlibrary.curbparking.action.vo;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import net.jlibrary.common.CoreConstants;
import net.jlibrary.common.core.annotation.VoForPo;
import net.jlibrary.common.core.entity.BaseVo;
import net.jlibrary.curbparking.domain.PictureGallery;
import net.jlibrary.curbparking.domain.PictureGalleryType;

@VoForPo(PictureGallery.class)
public class PictureGalleryVo extends BaseVo {
	private static final long serialVersionUID = -5608313959290434033L;
	private Long id;
	private PictureGalleryTypeVo type;
	private Long pk;
	private String className;
	private String fileAbsolutePath;
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date occurrenceTime;
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date createdate;
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date lastdate;

	public PictureGalleryVo() {
		type = new PictureGalleryTypeVo();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public PictureGalleryTypeVo getType() {
		return type;
	}

	public void setType(PictureGalleryTypeVo type) {
		this.type = type;
	}

	public Long getPk() {
		return pk;
	}

	public void setPk(Long pk) {
		this.pk = pk;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getFileAbsolutePath() {
		return fileAbsolutePath;
	}

	public void setFileAbsolutePath(String fileAbsolutePath) {
		this.fileAbsolutePath = fileAbsolutePath;
	}

	public Date getOccurrenceTime() {
		return occurrenceTime;
	}

	public void setOccurrenceTime(Date occurrenceTime) {
		this.occurrenceTime = occurrenceTime;
	}

	public Date getCreatedate() {
		return createdate;
	}

	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

	public Date getLastdate() {
		return lastdate;
	}

	public void setLastdate(Date lastdate) {
		this.lastdate = lastdate;
	}

	@Override
	public Serializable getPrimaryKey() {
		// TODO Auto-generated method stub
		return id;
	}

	@Override
	public Serializable getText() {
		// TODO Auto-generated method stub
		return className;
	}

	@VoForPo(PictureGalleryType.class)
	public class PictureGalleryTypeVo extends BaseVo {
		private static final long serialVersionUID = -1616200913601477125L;
		private Long id;
		private String name;
		private String code;
		private String description;
		private int taxis;
		private boolean valid;
		private boolean allowQueryInvalid;
		private boolean compellingDelete;
		private String parentIsNull;
		private String validString;
		@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
		@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
		private Date createdate;
		@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
		@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
		private Date lastdate;

		public Long getId() {
			return id;
		}

		@Override
		public Serializable getPrimaryKey() {
			return id;
		}

		@Override
		public Serializable getText() {
			return name;
		}

		public void setId(Long id) {
			this.id = id;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getDescription() {
			return description;
		}

		public void setDescription(String description) {
			this.description = description;
		}

		public int getTaxis() {
			return taxis;
		}

		public void setTaxis(int taxis) {
			this.taxis = taxis;
		}

		public boolean getValid() {
			return valid;
		}

		public void setValid(boolean valid) {
			this.valid = valid;
		}

		public boolean getAllowQueryInvalid() {
			return allowQueryInvalid;
		}

		public void setAllowQueryInvalid(boolean allowQueryInvalid) {
			this.allowQueryInvalid = allowQueryInvalid;
		}

		public boolean getCompellingDelete() {
			return compellingDelete;
		}

		public void setCompellingDelete(boolean compellingDelete) {
			this.compellingDelete = compellingDelete;
		}

		public String getParentIsNull() {
			return parentIsNull;
		}

		public void setParentIsNull(String parentIsNull) {
			this.parentIsNull = parentIsNull;
		}

		public String getValidString() {
			return validString;
		}

		public void setValidString(String validString) {
			this.validString = validString;
		}

		public Date getCreatedate() {
			return createdate;
		}

		public void setCreatedate(Date createdate) {
			this.createdate = createdate;
		}

		public Date getLastdate() {
			return lastdate;
		}

		public void setLastdate(Date lastdate) {
			this.lastdate = lastdate;
		}
	}

}
